﻿
<div>
    <script id="editor" type="text/plain" style="width:100%;height:500px;">
    </script>
</div>

<script src="~/lib/jquery/dist/jquery.js"></script>
<script src="~/lib/ueditor1.4.3.3/ueditor.config.js"></script>
<script src="~/lib/ueditor1.4.3.3/ueditor.all.js"></script>
<script>
    //实例化编辑器
    var ue = UE.getEditor('editor', {
        enableAutoSave: false,
        toolbars: [[
            'fullscreen', 'source', 'preview', 'searchreplace', '|', 'undo', 'redo', '|',
            'simpleupload', 'insertimage', 'template'
        ],
        ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
            'directionalityltr', 'directionalityrtl', 'indent', '|',
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
            'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter']]
    });

    @*//获取html内容，返回: <p>hello</p>
    var html = ue.getContent();
    //获取纯文本内容，返回: hello
    var txt = ue.getContentTxt();
    //设置内容
    ue.ready(function () {
        ue.setContent('@Html.Raw(Model.content?.Replace("\n",""))');
    });*@
</script>